import { createRouter, createWebHistory } from 'vue-router'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
	  {
		  path: '/',
		  name: 'Index',
		  component: () => import('@/views/sys/client'),
		  children:[
			  {
				  path: '/',
				  name: 'Indexmain',
				  component: () => import('@/views/sys/client/index-part')
			  },
			  {
				  path: '/goods',
				  name: 'GoodsIndex',
				  component: () => import('@/views/sys/client/goods')
			  },
			  {
				  path: '/user',
				  name: 'UserIndex',
				  component: () => import('@/views/sys/client/user'),
				  children:[
					{
						path: "/user",
						name: "PersonalInfo",
						component: () => import('@/views/sys/client/user-center')
					},
					{
						path: "/password-change",
						name: "PasswordChange",
						component: () => import('@/views/sys/client/user-center/password-change')
					},
					{
						path: "/my-collection",
						name: "MyCollection",
						component: () => import('@/views/sys/client/user-center/my-collection')
					},
					{
						path: "/my-orders",
						name: "MyOrders",
						component: () => import('@/views/sys/client/user-center/my-orders')
					},
					{
						path: "/recharge",
						name: "Recharge",
						component: () => import('@/views/sys/client/user-center/recharge')
					},
					{
						path: "/transfer",
						name: "Transfer",
						component: () => import('@/views/sys/client/user-center/transfer')
					},
					{
						path: "/consumption-record",
						name: "ConsumptionRecord",
						component: () => import('@/views/sys/client/user-center/consumption-record')
					}
				  ]
			  },
			  {
				  path: '/orders',
				  name: 'OrdersIndex',
				  component: () => import('@/views/sys/client/orders')
			  },
			  {
				  path: '/community',
				  name: 'CommunityIndex',
				  component: () => import('@/views/service'),
				  children:[
					  {
					  path: '/announcement',
					  name: 'Announcement',
					  component: () => import('@/views/service/message/announcement'),
					  },					  
					  {
					  path: '/visitor',
					  name: 'Visitor',
					  component: () => import('@/views/service/security/visitor'),
					  },
					  {
					  path: '/parking',
					  name: 'Parking',
					  component: () => import('@/views/service/security/parking'),
					  },
					  {
					  path: '/maintenance',
					  name: 'Maintenance',
					  component: () => import('@/views/service/property/maintenance'),
					  },
					  {
					  path: '/complaints',
					  name: 'Complaints',
					  component: () => import('@/views/service/property/complaints'),
					  },
					  {
					  path: '/payment',
					  name: 'Payment',
					  component: () => import('@/views/service/life/payment'),
					  }
				  ]
			  }
		  ]
	  },
	  {
		  path:'/login',
		  name: 'LoginRegister',
		  component: () => import('@/views/login')
	  }
   
  ]
})


export default router
